//
//  HomePageView.h
//  LabanBrowser
//
//  Created by -Xh- on 3/13/13.
//  Copyright (c) 2013 VNG. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "CustomPageControl.h"
#import "DialerView.h"
@class SpeedDialModel;


@protocol HomePageViewDelegate <NSObject>

@optional
-(void)onSpeedDialAtItem:(SpeedDialModel*)_model;
-(void)onAddingNewSpeedDial;
-(void)onPressLinkOnHomePage:(NSString*)_request;
-(void)onDeleteOnHomePageAtIndexPath:(NSIndexPath*)_indexPath;
-(void)onHomePageEditAtIndexPath:(NSIndexPath*)_indexPath AndModel:(SpeedDialModel*)_speedDial;
-(void)onTapNoWhere;

@end



#define SG_TAB_WIDTH 320.0
@interface HomePageViewController : UIViewController<UIScrollViewDelegate, UICollectionViewDataSource,
UICollectionViewDelegate,UIWebViewDelegate,UIActionSheetDelegate,CustomPageControlDelegate>
@property (nonatomic) UIScrollView* scrollView;
@property (nonatomic) NSMutableArray* viewList;
@property (nonatomic) DialerView* dialer;
@property (nonatomic) id<HomePageViewDelegate> delegate;
@property (nonatomic) CustomPageControl* pageControl;
@property (nonatomic) NSMutableDictionary* dialerURLDict;
@property (nonatomic) SpeedDialModel* currentLongPressingSpeedDial;


@property (nonatomic) NSString* lastURL;


-(void)performDeleteAtIndexPath:(NSIndexPath*)_indexPath;
-(void)performDeleteAtID:(NSString*)_id;
-(void)performInsert:(SpeedDialModel*)_speedDial;
-(void)performUpdateWithModel:(SpeedDialModel*)_speedDial;
-(void)performInsertWithAnimation:(SpeedDialModel*)_speedDial;
-(void)putPresenterOnTop;
-(void)recoverRealView;
-(BOOL)isPresentingDialer;

-(void)animateToRect:(CGRect)_rect;
-(void)removeOtherSideViews;
-(void)recoverAllSideViews;
-(void)reflowDialerWhenGoingBackFromSettings;
@end
